Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move unit tests from tests/ to test/ #868

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

EvanHahn
Copy link
Contributor

This is a simple rename.

I did this so that we could match Node's convention:

If a directory named test is encountered, the test runner will search it recursively for all all .js, .cjs, and .mjs files. All of these files are treated as test files, and do not need to match the specific naming convention detailed below. This is to accommodate projects that place all of their tests in a single test directory.

Notice that npm run test:unit now just runs node --test with no arguments.

This is a simple rename.

I did this so that we could match [Node's convention][0]:

> If a directory named `test` is encountered, the test runner will
> search it recursively for all all `.js`, `.cjs`, and `.mjs` files. All
> of these files are treated as test files, and do not need to match the
> specific naming convention detailed below. This is to accommodate
> projects that place all of their tests in a single `test` directory.

Notice that `npm run test:unit` now just runs `node --test` with no
arguments.

[0]: https://nodejs.org/docs/latest-v20.x/api/test.html#running-tests-from-the-command-line
@EvanHahn EvanHahn merged commit ab66b21 into main Sep 26, 2024
6 checks passed
@EvanHahn EvanHahn deleted the move-unit-tests-to-test-folder branch September 26, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants